<template>
	<view>
		<uni-nav-bar>
			<u-tabs :list="list1" @click="clickTab" :scrollable="false"></u-tabs>
		</uni-nav-bar>
	</view>
	<post v-show="current==0"/>
	<topic v-show="current==1"/>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import post from './components/post/index.vue'
	import topic from './components/topic/index.vue'
	const list1 = ref([{
			name: '帖子',
		},
		{
			name: '主题',
		}
	])
	const current = ref(0)
	const clickTab = ((e) => {
		console.log(e, '999')
		current.value = e.index
	})
</script>

<style lang="scss" scoped>
	:deep(.uni-navbar) {
		display: flex;
		background-color: #fff;
		justify-content: center;
	}
</style>